package com.example.test.Service;

import com.example.test.DAO.BookDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookService {
    @Autowired
    BookDAO bookDAO;
    public void checkout(String username,String isbn){
        bookDAO.updateStock(isbn);
        bookDAO.updateBalance(username,bookDAO.getPrice(isbn));
    }
}
